<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>V-Model(数据双向绑定)</title>
    <script src="vue2610.js"></script>
</head>

<body>
    <div id="app">
        <p>
            {{name}}
        </p>
        <div>
            <p>v - model</p>
            <!-- input中输入变化时,会直接影响name的值,v-bind是单向的(值->view), -->
            <input type="text" v-model="name">
            <hr>
            <p>v - bind </p>
            <input type="text" v-bind:value='name'>
        </div>
    </div>
</body>

<script>
    let vm = new Vue({
        el: '#app',
        data: {
            name: 'good morning',
        }
    });
</script>

</html>